#include<iostream>
using namespace std;
int main()
{
	int arr[]={3,5,6,9,5,2,4,7};
	int len=8;
	int count[8]={0};//9-2+1
	for(int i=0;i<len;i++)
	{
		count[arr[i]]++;
	}
	for(int i=0;i<8;i++)
	{
		while(count[i]!=0)
		{
			cout<<i<<" ";
			count[i]--;
		}
	}
	return 0;
}
 
